package Demo;

import java.util.ArrayList;

public class java6 {
	public static void main(String[] args) {
		int[] arr1 = {1,2,3};  
        int[] arr2 = {3,4,5,2}; 
        ArrayList<Integer> list=new ArrayList<Integer>();
        ArrayList<Integer> delete = new ArrayList<>();
        for(int i=0;i<arr1.length;i++){
        	list.add(arr1[i]);
        }
        for(int i=0;i<arr2.length;i++){
        	if(list.contains(arr2[i])){
        		delete.add(arr2[i]);
        	}else{
        		list.add(arr2[i]);
        	}
        }
        list.removeAll(delete);
        System.out.println(list);
	}
}
